var express = require('express');
var router = express.Router();

var user = require('../app/controllers/user');
/* GET login api*/

router.route('/login')
    .get(user.login)
    .post(user.login);

router.route('/register')
    .get(user.register)
    .post(user.register);

//创建群组
router.route('/createGroup')
    .get(user.createGroup)
    .post(user.createGroup);

router.route('/groupList')
    .get(user.groupList)
    .post(user.groupList);


router.route('/queryGroup')
    .get(user.queryGroup)
    .post(user.queryGroup);

router.route('/deleGroup')
    .get(user.deleGroup)
    .post(user.deleGroup);

router.route('/joinGroup')
    .get(user.joinGroup)
    .post(user.joinGroup);

router.route('/updateGroup')
    .get(user.updateGroup)
    .post(user.updateGroup);

router.route('/quitGroup')
    .get(user.quitGroup)
    .post(user.quitGroup);

module.exports = router;
